<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="utf-8" />
        <title>Crushの小窝</title>
        <link rel="stylesheet" href="../css/style.css" />
        <link rel="stylesheet" href="../css/editormd.css" />
        <link rel="stylesheet" href="../css/bootstrap.min.css">
        <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
    </head>
    <body>
        <div id="layout">
            <header>
                <h1>MARKDOWN&nbsp;编辑器</h1>
                <button class="btn submit" style="position: absolute;top:15px;right:100px;width: 50px;height: 50px;border-radius: 18px;background: #eee">
                    <span class="glyphicon glyphicon-floppy-open"></span>
                </button>
                <button class="btn upload" style="position: absolute;top:15px;right:180px;width: 50px;height: 50px;border-radius: 18px;background: #eee">
                    <input type="file" accept=".md" id="mdFile" style="display: none" onchange="convertToEdit()">
                    <span class="glyphicon glyphicon-file"></span>
                </button>
            </header>
            <div id="test-editormd">
                <textarea id="edit-textarea" style="display:none;"></textarea>
            </div>
        </div>
        <script src="../js/jquery.min.js"></script>
        <script src="../js/popper.js"></script>
        <script src="../js/bootstrap.min.js"></script>
        <script src="../js/editormd.js"></script>
        <script src="../js/vue.js"></script>
        <script src="../js/edit.js"></script>
        <script type="text/javascript">
			var testEditor;

            $(function() {
                testEditor = editormd("test-editormd", {
                    width   : "90%",
                    height  : 800,
                    syncScrolling : "single",
                    path    : "../lib/",
                    emoji:true
                });
                $('.upload').click(function (){
                    document.getElementById("mdFile").click();
                })
                /*
                // or
                testEditor = editormd({
                    id      : "test-editormd",
                    width   : "90%",
                    height  : 640,
                    path    : "../lib/"
                });
                */
            });
        </script>
    </body>
</html>